<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>3.弹性布局与传统布局响应对⽐</title>
  <style>
    * {
      padding :0;
      margin: 0;
    }
    /*传统方式*/
    /* main {
      position: relative; 
      height: 100vh;
    }

    main nav {
      width: 80px;
      position: absolute;
      left: 0;
      top: 0;
      bottom: 0;
      background: blueviolet;

    }
    main article {
      background: #ccc;
      padding-left: 90px;
      background-clip: content-box;
      height: 100vh;
    } */

    /*flex弹性 
    更简单，且不需要计算*/
    main {
      display: flex;
      height: 100vh;
    }

    main nav {
      background: blue;
      width: 80px;
    }
    main article {
      background: #ddd;
      flex: 1;
    } 
  </style>
</head>
<body>
  <main>
    <nav></nav>
      <article>
      aa
      </article>
  </main>

</body>
</html>